package heima3_2.cn.osc.ui.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import net.oschina.app.R;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * Created by emily on 2017/1/14.
 */
public class SearchPersonActivity extends AppCompatActivity {
    @Bind(R.id.iv_search_person)
    ImageView ivSearchPerson;
    @Bind(R.id.et_serch_person)
    EditText etSerchPerson;
    @Bind(R.id.button_clear)
    Button buttonClear;
    @Bind(R.id.rv_search_person)
    RecyclerView rvSearchPerson;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.find_fragment_search_person_activity);
        ButterKnife.bind(this);
//        getSupportActionBar().hide();
        initData();
    }

    private void initData() {


    }


    @OnClick({R.id.et_serch_person, R.id.button_clear})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.et_serch_person:
                //实时查询
                String phone= etSerchPerson.getText().toString().trim();
                if (phone!=null) {
                    buttonClear.setVisibility(View.VISIBLE);
                }
                break;
            case R.id.button_clear:
                etSerchPerson.setText("");
                break;
        }
    }
}
